﻿package field {
	
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	
	
	public class AtomicBomb extends Element implements Bomb {
		
		public function AtomicBomb() {
			// constructor code
			addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
			addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
		}

		public override function onMouseOver(e: MouseEvent): void {
			if (main.currentBonus == null) {
				panel.findElementsUnderCursor(tileX, tileY, 0);
				panel.blinkElementsUnderCursor();
			}else {
				main.currentBonus.select(tileX, tileY);
			}
		}
		
		public override function onMouseOut(e: MouseEvent): void {
			//panel.
			panel.stopBlink();
		}
		
		public function get radius(): Number {
			return 2;
		}
	}
}
